package com.yanqu.road.entity.activity.yingxin;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.activity.yingxin.floor.YingXinFloorData;
import com.yanqu.road.entity.activity.yingxin.game.YingXinGameData;

import java.util.List;
import java.util.Map;

@FieldTypeAnnotation(tableName = "t_u_activity_yingxin_user")
public class YingXinUserData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "玩家ID", select = true, update = true)
    private long userId;
    @FieldTypeAnnotation(desc = "体力")
    private int energy;
    @FieldTypeAnnotation(desc = "上次恢复时间")
    private long lastRecTime;
    @FieldTypeAnnotation(desc = "火锅收集数量")
    private Map<Integer, List<Integer>> collectList;
    @FieldTypeAnnotation(desc = "积分")
    private long score;

    @FieldTypeAnnotation(desc = "挖火锅数据（类型，数据）")
    private Map<Integer, YingXinFloorData> floorDataMap;
    @FieldTypeAnnotation(desc = "游戏数据（倍数，数据）")
    private Map<Integer, YingXinGameData> gameDataMap;
    @FieldTypeAnnotation(desc = "挖火锅是否通关一轮得到大奖map(类型,值)")
    private Map<Integer, Integer> gotBigRewardMap;

    // ==================================================

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public int getEnergy() {
        return energy;
    }

    public void setEnergy(int energy) {
        if (this.energy != energy) {
            this.energy = energy;
            setOp(DataStatus.Update);
        }
    }

    public long getLastRecTime() {
        return lastRecTime;
    }

    public void setLastRecTime(long lastRecTime) {
        if (this.lastRecTime != lastRecTime) {
            this.lastRecTime = lastRecTime;
            setOp(DataStatus.Update);
        }
    }

    public Map<Integer, List<Integer>> getCollectList() {
        return collectList;
    }

    public void setCollectList(Map<Integer, List<Integer>> collectList) {
        if (null == collectList) {
            return;
        }
        this.collectList = collectList;
        setOp(DataStatus.Update);
    }

    public long getScore() {
        return score;
    }

    public void setScore(long score) {
        if (this.score != score) {
            this.score = score;
            setOp(DataStatus.Update);
        }
    }

    public Map<Integer, YingXinFloorData> getFloorDataMap() {
        return floorDataMap;
    }

    public void setFloorDataMap(Map<Integer, YingXinFloorData> floorDataMap) {
        if (null == floorDataMap) {
            return;
        }
        this.floorDataMap = floorDataMap;
        setOp(DataStatus.Update);
    }

    public Map<Integer, YingXinGameData> getGameDataMap() {
        return gameDataMap;
    }

    public void setGameDataMap(Map<Integer, YingXinGameData> gameDataMap) {
        if (null == gameDataMap) {
            return;
        }
        this.gameDataMap = gameDataMap;
        setOp(DataStatus.Update);
    }

    public Map<Integer, Integer> getGotBigRewardMap(){ return gotBigRewardMap;}

    public void setGotBigRewardMap(Map<Integer, Integer> gotBigRewardMap){
        if (null == gotBigRewardMap){
            return;
        }
        this.gotBigRewardMap = gotBigRewardMap;
        setOp(DataStatus.Update);
    }

}
